package com.itheima.consumerspringboot;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener;
import org.springframework.stereotype.Component;

import java.io.IOException;

@Component
public class RabbimtMQListener  {
//延时队列
    @RabbitListener(queues = "dead_Queue")
    public void ListenerQueue(Message message){

        //System.out.println(message);
        System.out.println(new String(message.getBody()));
    }

}
